<?php
/**
 * Created by PhpStorm.
 * User: 曹旺
 * Date: 2018-03-22
 * Time: 10:20
 */

namespace app\index\validate;

use think\Validate;

class Address extends Validate
{
    //新增收货地址验证
    protected $rule = [
        'user_id' => 'require',
        'consignee'=>'require',
        'consignee_phone'=>'require|length:11',
        'address_info'=>'require',
        'address'=>'require',
    ];
    protected $message=[
        'user_id.require'=>'用户id必须',
        'consignee.require'=>'收货人必须',
        'consignee_phone.require'=>'收货人手机号必须',
        'consignee_phone.length'=>'收货人手机号必须11位',
        'address_info.require'=>'收货地址详情必须',
        'address.require'=>'收货地址所在的省份',
    ];
}